<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018-03-25
  Time: 10:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>首页</title>
</head>
<body>

<p>
<c:forEach items="${sessionScope.get('categoryEnums')}" var="categoryEnum">
    <a href="<%=request.getContextPath()%>/news/list/${categoryEnum.code}">${categoryEnum.category}</a>&nbsp;&nbsp;
</c:forEach>
</p>

<div>
    <c:forEach items="${newsList}" var="news">
        <p><a href="<%=request.getContextPath()%>/news/query/${news.newsId}">${news.title}</a></p>
    </c:forEach>
</div>
</body>
</html>
